-- GENERATED SPELL FOR [Magronos the Unyielding] --


function spell0_8297(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8297', 532, 1)
end

function spell1_8297(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_8297', 603, 1)
end

function spell2_8297(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(9080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8297', 10282, 1)
end

function Sorts_8297(pUnit, Event)
local choix_sorts_8297 = math.random(0, 2)
if choix_sorts_8297 == 0 then
pUnit:RegisterEvent('spell0_8297', 1, 1)
end
if choix_sorts_8297 == 1 then
pUnit:RegisterEvent('spell1_8297', 1, 1)
end
if choix_sorts_8297 == 2 then
pUnit:RegisterEvent('spell2_8297', 1, 1)
end
end

function mob8297_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8297', math.random(1500, 3000), 1)
end

function mob8297_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8297_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8297_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8297, 1, 'mob8297_Action')
RegisterUnitEvent(8297, 2, 'mob8297_Leave')
RegisterUnitEvent(8297, 3, 'mob8297_Kill')
RegisterUnitEvent(8297, 4, 'mob8297_Die')
